package lab02.test03;
import java.util.Scanner;
public class Test03 {
    public static void main(String[] args) {
        Student student = new Student();
        student.setComputerGradle(100);
        student.setMathGradle(98);
        student.setEnglishGradle(90);
        Scanner Sc = new Scanner(System.in);
        while (true){
            System.out.println("请输入你想实现的功能：");
            System.out.println("1" + "\t" + "求学生的总分。");
            System.out.println("2" + "\t" + "求学生的平均分。");
            System.out.println("3" + "\t" + "求学生的最高分。");
            System.out.println("4" + "\t" + "求学生的最低分。");
            System.out.println("5" + "\t" + "输出学生的信息。");
            System.out.println("6" + "\t" + "退出。");
            int i = Sc.nextInt();
            switch (i) {
                case 1:
                    student.sum();
                    break;
                case 2:
                    student.average();
                    break;
                case 3:
                    student.max();
                    break;
                case 4:
                    student.min();
                    break;
                case 5:
                    System.out.println(student.toString());
                    break;
                case 6:
                    return;
            }
        }
    }
}
